static char normals_fragment_shader[] = 
"#version 330\n"
"\n"
"uniform float uAlpha;\n"
"\n"
"in vec3 vNormal;\n"
"\n"
"layout(location = 0) out vec4 fragColor;\n"
"\n"
"void main() {\n"
"	vec3 normal = normalize(vNormal);\n"
"	fragColor = vec4((vNormal+1.0)/2.0, uAlpha);\n"
"}\n"
;

static char normals_vertex_shader[] = 
"#version 330\n"
"\n"
"uniform mat4 uMVMatrix;\n"
"uniform mat4 uMVPMatrix;\n"
"uniform mat3 uNormalMatrix;\n"
"\n"
"in vec3 aPosition;\n"
"in vec3 aNormal;\n"
"\n"
"out vec3 vNormal;\n"
"\n"
"void main() {\n"
"	vNormal = normalize(uNormalMatrix * aNormal);\n"
"	\n"
"	// vertex position\n"
"	gl_Position = uMVPMatrix * vec4(aPosition, 1.0);\n"
"}\n"
;

static char phongblinn_fragment_shader[] = 
"#version 330\n"
"\n"
"uniform vec3 uColor;\n"
"uniform float uAlpha;\n"
"uniform float uShininess;\n"
"\n"
"in vec3 vPosition;\n"
"in vec3 vLightPosition1;\n"
"in vec3 vLightPosition2;\n"
"in vec3 vLightPosition3;\n"
"in vec3 vNormal;\n"
"\n"
"const vec3 ambientColor = vec3(0.0, 0.0, 0.0);\n"
"const vec3 specColor = vec3(0.5, 0.5, 0.5);\n"
"\n"
"layout(location = 0) out vec4 fragColor;\n"
"\n"
"void main()\n"
"{\n"
"	vec3 normal = normalize(vNormal);\n"
"    \n"
"    vec3 lightDir1 = normalize(vLightPosition1);\n"
"    vec3 lightDir2 = normalize(vLightPosition2);\n"
"    vec3 lightDir3 = normalize(vLightPosition3);\n"
"	\n"
"    float lambertian1 = max(dot(lightDir1, normal), 0.0);\n"
"    float lambertian2 = max(dot(lightDir2, normal), 0.0);\n"
"    float lambertian3 = max(dot(lightDir3, normal), 0.0);\n"
"    \n"
"    float specular1 = 0.0;\n"
"    float specular2 = 0.0;\n"
"    float specular3 = 0.0;\n"
"    \n"
"    vec3 viewDir = normalize(-vPosition);\n"
"    \n"
"    vec3 halfDir1 = normalize(lightDir1 + viewDir);\n"
"    vec3 halfDir2 = normalize(lightDir2 + viewDir);\n"
"    vec3 halfDir3 = normalize(lightDir3 + viewDir);\n"
"    \n"
"    float specAngle1 = max(dot(halfDir1, normal), 0.0);\n"
"    float specAngle2 = max(dot(halfDir2, normal), 0.0);\n"
"    float specAngle3 = max(dot(halfDir3, normal), 0.0);\n"
"    \n"
"    specular1 = pow(specAngle1, uShininess);\n"
"    specular2 = pow(specAngle2, uShininess);\n"
"    specular3 = pow(specAngle3, uShininess);\n"
"    \n"
"    float lambertian = (lambertian1+lambertian2+lambertian3)/1.0;\n"
"    float specular = (specular1+specular2+specular3)/1.0;\n"
"    \n"
"    fragColor = vec4(ambientColor + lambertian*uColor + specular*specColor, uAlpha);\n"
"}\n"
;

static char phongblinn_vertex_shader[] = 
"#version 330\n"
"\n"
"uniform mat4 uMVMatrix;\n"
"uniform mat4 uMVPMatrix;\n"
"uniform mat3 uNormalMatrix;\n"
"uniform vec3 uLightPosition1;\n"
"uniform vec3 uLightPosition2;\n"
"uniform vec3 uLightPosition3;\n"
"\n"
"in vec3 aPosition;\n"
"in vec3 aNormal;\n"
"\n"
"out vec3 vPosition;\n"
"out vec3 vLightPosition1;\n"
"out vec3 vLightPosition2;\n"
"out vec3 vLightPosition3;\n"
"out vec3 vNormal;\n"
"\n"
"void main() {\n"
"\n"
"	vec4 position = uMVMatrix * vec4(aPosition, 1.0);\n"
"	\n"
"    vec3 normal = normalize(uNormalMatrix * aNormal);\n"
"\n"
"	vPosition = position.xyz;\n"
"    vLightPosition1 = uLightPosition1.xyz;\n"
"    vLightPosition2 = uLightPosition2.xyz;\n"
"    vLightPosition3 = uLightPosition3.xyz;\n"
"    \n"
"	vNormal = normal;\n"
"	\n"
"	// vertex position\n"
"	gl_Position = uMVPMatrix * vec4(aPosition, 1.0);\n"
"}\n"
;

static char silhouette_fragment_shader[] = 
"#version 330\n"
"\n"
"uniform vec3 uColor;\n"
"uniform float uAlpha;\n"
"\n"
"layout(location = 0) out vec4 fragColor;\n"
"\n"
"void main()\n"
"{\n"
"	fragColor = vec4(uColor, uAlpha);\n"
"}\n"
;

static char silhouette_vertex_shader[] = 
"#version 330\n"
"\n"
"uniform mat4 uMVPMatrix;\n"
"in vec3 aPosition;\n"
"\n"
"\n"
"void main()\n"
"{\n"
"	// vertex position\n"
"	gl_Position = uMVPMatrix * vec4(aPosition, 1.0);\n"
"}\n"
;

